<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Gets an exportable representation of a key into a string</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-pkey-export-to-file.html">openssl_pkey_export_to_file</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-pkey-free.html">openssl_pkey_free</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.openssl-pkey-export" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_pkey_export</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5)</p><p class="refpurpose"><span class="refname">openssl_pkey_export</span> &mdash; <span class="dc-title">Gets an exportable representation of a key into a string</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.openssl-pkey-export-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>openssl_pkey_export</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$key</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter reference">&$out</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$passphrase</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$configargs</code></span>
  ]] )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>openssl_pkey_export()</strong></span> exports
   <em><code class="parameter">key</code></em> as a PEM encoded string and stores it into
   <em><code class="parameter">out</code></em> (which is passed by reference).
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
<span class="simpara">
 必须安装有效的 <var class="filename">openssl.cnf</var> 以保证此函数正确运行。参考有关<a href="openssl.installation.html" class="link">安装</a>的说明以获得更多信息。
</span>
</p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-pkey-export-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">key</code></em></dt>

     <dd>

      <p class="para">
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">out</code></em></dt>

     <dd>

      <p class="para">
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">passphrase</code></em></dt>

     <dd>

      <p class="para">
       The key is optionally protected by <em><code class="parameter">passphrase</code></em>.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">configargs</code></em></dt>

     <dd>

      <p class="para">
       <em><code class="parameter">configargs</code></em> can be used to fine-tune the export
       process by specifying and/or overriding options for the openssl
       configuration file.  See <span class="function"><a href="function.openssl-csr-new.html" class="function">openssl_csr_new()</a></span> for more
       information about <em><code class="parameter">configargs</code></em>.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-pkey-export-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-pkey-export-to-file.html">openssl_pkey_export_to_file</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-pkey-free.html">openssl_pkey_free</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
